package com.itheima.filedemo;

import java.io.File;

public class FileDemo1 {
    public static void main(String[] args) {
//        method1();
//        method2();
//        method3();
    }

    private static void method3() {
        File file1 = new File("D:\\IdeaProjects\\JavaStudyProject\\FileModule\\itheima");
        String fileName = "a.txt";
        File file = new File(file1, fileName);
        System.out.println(file);
    }

    private static void method2() {
        String path = "D:\\IdeaProjects\\JavaStudyProject\\FileModule\\itheima";
        String fileName = "a.txt";
        File file = new File(path, fileName);
        System.out.println(file);
    }

    private static void method1() {
        String path = "D:\\IdeaProjects\\JavaStudyProject\\FileModule\\itheima\\a.txt";
        File file = new File(path);
        System.out.println(file);
    }
}
